package com.itheima.sh.HomeWork;

public class Test02 {
    public static void main(String[] args) {
        String st="adfdfsfksdfsdjfhsjdfhsfkdfgjdfkgljlds";
        int count=0;
        for (int i = 0; i < st.length(); i++) {
            if(st.charAt(i)=='f'){
                count++;
            }
        }
        System.out.println("该字母出现的次数为："+count);
    }
}
